package com.mmaingenieria.MMAGestor.controller;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class CerrarSesionServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    
    private static final String paginaFinalSesion = "includes/finSesion.jsp";
   
   //Metodo GET
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        
        doPost (request, response); //todo lo que llegue por Get que vaya por Post
    }
    
   //Metodo POST
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        RequestDispatcher dispatcher = null; //Creo variable dispatcher
        dispatcher = request.getRequestDispatcher(paginaFinalSesion);//Le digo a donde tiene que ir
        dispatcher.forward(request, response);//Le digo que vaya
    }
}
